
package com.shop.cloud.mall.api.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shop.cloud.common.core.constant.CacheConstants;
import com.shop.cloud.mall.api.mapper.DistributionConfigMapper;
import com.shop.cloud.mall.api.service.DistributionConfigService;
import com.shop.cloud.mall.common.entity.DistributionConfig;
import lombok.AllArgsConstructor;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.io.Serializable;

/**
 * 分销设置
 *
 * @author
 * @date 2021-04-13 15:21:00
 */
@Service
@AllArgsConstructor
public class DistributionConfigServiceImpl extends ServiceImpl<DistributionConfigMapper, DistributionConfig> implements DistributionConfigService {

	@Override
	@Cacheable(value = CacheConstants.MALL_DISTRIBUTION_CONFIG_CACHE, key = "'value'")
	public DistributionConfig getByTenantId(Serializable tenantId) {
		return baseMapper.selectOne(Wrappers.emptyWrapper());
	}


}
